import MainView from "../modules/mainView.js";
import student from "./stundent/student.js";
import clazz from "./classes/clazz.js";
import user from './user/user.js'

//配置路由规则
var routes = {
      ...user,
     '/main':{
          ...student, //给student模块的路由展开
          ...clazz,
          //一级路由（需要先执行）
          on:()=>{ 
              new MainView("app")
            }
       }
     };
//创建前端路由器
//var router = Router(routes);
//配置路由的读取方式
var router = Router(routes).configure({ recurse: 'forward' });
//初始化路由器
router.init();
//初始化路由
window.location.hash = window.location.hash||"#/login"